import Vue from 'vue'

import tmGroup from '@/package/components/tm-group'

import widgetText from './texts/widgetText'
import widgetNum from './texts/widgetNum'
import widgetDate from './texts/widgetDate'
import widgetButton from './texts/widgetButton'
import widgetImage from './texts/widgetImage'
import widgetVideo from './texts/widgetVideo'
import widgetTab from './texts/widgetTab'

import scrollTable from './table/scrollTable'

import border01 from './border/border01'
import border02 from './border/border02'
import border03 from './border/border03'
import border04 from './border/border04'
import border05 from './border/border05'
import border06 from './border/border06'
import border07 from './border/border07'
import border08 from './border/border08'
import border09 from './border/border09'
import border10 from './border/border10'
import border11 from './border/border11'
import border12 from './border/border12'
import border13 from './border/border13'

import bar01 from './chart/bars/bar01'
import bar02 from './chart/bars/bar02'
import line01 from './chart/lines/line01'
import line02 from './chart/lines/line02'

import pie01 from './chart/pies/pie01'
import pie02 from './chart/pies/pie02'

import gauge01 from './chart/gauge/gauge01'

import radar01 from './chart/radar/radar01'

import map01 from './chart/map/map01'
import map02 from './chart/map/map02'

const widgets = {
  tmGroup,

  widgetText,
  widgetNum,
  widgetDate,
  widgetButton,
  widgetImage,
  widgetVideo,
  widgetTab,

  scrollTable,

  border01,
  border02,
  border03,
  border04,
  border05,
  border06,
  border07,
  border08,
  border09,
  border10,
  border11,
  border12,
  border13,

  bar01,
  bar02,

  line01,
  line02,

  pie01,
  pie02,

  gauge01,
  radar01,

  map01,
  map02
}

Object.keys(widgets).forEach(key => {
  Vue.component(key, widgets[key]);
});
